<?php
/*
 * Created on 2011-11-24
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 class Modifpwd extends AdminAction{
 	function index(){
		$adminuser = getSession('adminuser');
		$data['adminuser']= $adminuser;
		template('modifpwd',$this->data);
	}
	
	function pwdupdate(){
			$adminuser = getSession('adminuser');
		$db = $this->getDB();
		
		$newpass = P("newpass");
		$db->query("update manager set loginpass = '$newpass' where id = ".$adminuser['id']);
		
		message('用户密码修改成功！', '/admin.php/modifpwd/index');
	}
 } 
